#!/bin/bash
set -o nounset                              # Treat unset variables as an error
echo '
      set terminal epslatex color colortext
    set output "watt_24_streams_2nic_final.tex"
      set xlabel "Time(s)"
      set ylabel "Mb/s"
      set key off
f(x) = mean_y
fit f(x) "data/watt_24_streams_2nic_final" u 1:3 via mean_y
      set label 3 gprintf("Mean = %gMb/s", mean_y) at  60,16000
      plot "data/watt_24_streams_2nic_final" using 1:3 with line title "Total","data/watt_24_streams_2nic_final" using 1:9 with line title "Stream 0","data/watt_24_streams_2nic_final" using 1:10 with line title "Stream 1","data/watt_24_streams_2nic_final" using 1:11 with line title "Stream 2","data/watt_24_streams_2nic_final" using 1:12 with line title "Stream 3","data/watt_24_streams_2nic_final" using 1:13 with line title "Stream 4","data/watt_24_streams_2nic_final" using 1:14 with line title "Stream 5","data/watt_24_streams_2nic_final" using 1:15 with line title "Stream 6","data/watt_24_streams_2nic_final" using 1:16 with line title "Stream 7","data/watt_24_streams_2nic_final" using 1:17 with line title "Stream 8","data/watt_24_streams_2nic_final" using 1:18 with line title "Stream 9","data/watt_24_streams_2nic_final" using 1:19 with line title "Stream 10","data/watt_24_streams_2nic_final" using 1:20 with line title "Stream 11","data/watt_24_streams_2nic_final" using 1:21 with line title "Stream 12","data/watt_24_streams_2nic_final" using 1:22 with line title "Stream 13","data/watt_24_streams_2nic_final" using 1:23 with line title "Stream 14","data/watt_24_streams_2nic_final" using 1:24 with line title "Stream 15"
' |gnuplot -persist
